[Previous] [Next] [Index]
[Thread]
Re: URGENT!! Multiple WWW names on the same machine.
On Thu, 8 Feb 1996, Daniel W. Woycke wrote:
> > I have this problem: I have a httpd 1.4.2(NSCA) server running in a
> >SunSparc5 with Solaris2.4. I want to have multiples WWW servers name on
> >the same machine, so if some one is looking for:
> >
> > http://www.abc.com - can be redirected to:
> > http://www.myhost.com/some_directory
> >
> > I read that I must have multiple IP address to the same ethernet
> >interface, if I can't do that, How can I solve this problem???
> >
>
> Try using DNS to answer the same IP for differn domain names...
I would recommend a solution like the following:
Two IP addresses and domain names:
www.foo.com 111.111.111.1
www-bar.foo.com 111.111.111.2
On your Sparc 5:
111.111.111.1 -> IP address assigned to primary interface (le0)
111.111.111.2 -> IP address assinged to "virtual interface".
This is also known as aliasing a secondary address
onto an interface. Solaris lets you have 256 on
a single physical interface.
You can create the virtual interface with
ifconfig le0:1 inet 111.111.111.2 up
(using the above example).
Then, you can run two http servers. One will automatically bind to the
address running on the primary interface. The second instance of http
needs to have a directive which tells it to bind to a different
address...in the above example 111.111.111.2. I believe this is part of
the <virtualhost> directive in the httpd.conf file under some later
versions of NCSA httpd. I believe 1.4.2 supports this, but someone else
may know better. Read the fine manual.
The second server can set DocumentRoot to a different directory than
the first, and you're all set.
-brian
--
Brian W. Spolarich - ANS CO+RE Systems - briansp@ans.net - (313)677-7311
Want strong encryption? Use ROT26. Its _twice_ as strong as ROT13.
References: